home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / network / exp16116.zip / VERIFYPI.ASM < prev   
Assembly Source File  |  1994-03-14  |  1KB  |  41 lines

  1. signature    db    'PKT DRVR',0
  2. signature_len    equ    $-signature
  3.  
  4. packet_int_msg    db    CR,LF
  5.         db    "Error: <packet_int_no> should be 0x60->0x66, 0x68->0x6f, or 0x7b->0x7e",CR,LF
  6.         db    "       0x67 is the EMS interrupt, and 0x70 through 0x77 are used by second 8259,"
  7.         db    "       and 0x7a is used by NetWare's IPX"
  8.         db    '$'
  9.  
  10. verify_packet_int:
  11. ;enter with no special registers.
  12. ;exit with cy,dx-> error message if the packet int was bad,
  13. ;  or nc,zr,es:bx -> current interrupt if there is a packet driver there.
  14. ;  or nc,nz,es:bx -> current interrupt if there is no packet driver there.
  15.     cmp    entry_point,60h        ;make sure that the packet interrupt
  16.     jb    verify_packet_int_bad    ;  number is in range.
  17.     cmp    entry_point,67h        ;make sure that the packet interrupt
  18.     je    verify_packet_int_bad    ;  number is in range.
  19.     cmp    entry_point,70h        ;make sure that the packet interrupt
  20.     jb    verify_packet_int_ok    ;  number is in range.
  21.     cmp    entry_point,7bh        ;make sure that the packet interrupt
  22.     jb    verify_packet_int_bad    ;  number is in range.
  23.     cmp    entry_point,7eh
  24.     jbe    verify_packet_int_ok
  25. verify_packet_int_bad:
  26.     mov    dx,offset packet_int_msg
  27.     stc
  28.     ret
  29. verify_packet_int_ok:
  30.  
  31.     mov    ah,35h            ;get their packet interrupt.
  32.     mov    al,entry_point
  33.     int    21h
  34.  
  35.     lea    di,3[bx]        ;see if there is already a signature
  36.     mov    si,offset signature    ;  there.
  37.     mov    cx,signature_len
  38.     repe    cmpsb
  39.     clc
  40.     ret
  41.